<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>个人信息</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	function openNewWindow(field1) {
		var btn =  document.getElementById("btn1");
		var iTop = (window.screen.availHeight - 30 - 600) / 2; 
           //获得窗口的水平位置 
        var iLeft = (window.screen.availWidth - 10 - 800) / 2; 
		var str = window.open(field1,'','width=800,height=600,left='+iLeft+',top='+iTop);
		
		
	}
		$(document).ready(function() {
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/user/info">房产信息</a></li>
		<li><a href="${ctx}/sys/user/modifyPwd">修改密码</a></li>
	</ul><br/>
	<form:form id="inputForm" action="" method="post" class="form-horizontal"><%--
		<form:hidden path="email" htmlEscape="false" maxlength="255" class="input-xlarge"/>
		<sys:ckfinder input="email" type="files" uploadPath="/mytask" selectMultiple="false"/> --%>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">楼名:</label>
			<div class="controls">
				<label class="control-label">${room.building.buildingName}</label>
			</div>
		</div>
		
		
		<div class="control-group">
			<label class="control-label">楼层:</label>
			<div class="controls">
				<label class="control-label">${room.floor }</label>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">房号:</label>
			<div class="controls">
				<label class="control-label">${room.roomNum }</label>
			</div>
		</div>
		
		<!-- 设定为点击后出现一个页面给用户查看，自己的这个楼宇的管理员到底是谁 -->
		<div class="control-group">
			<label class="control-label">管理员:</label>
			<div class="controls">
				<button onclick="openNewWindow('${ctx}/owner/tenement/findMyAdmin')" class="btn btn-primary">查看管理员</button>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">意见反馈:</label>
			<div class="controls">
				<button onclick="openNewWindow('${ctx}/feedback/MyOwnFeedback')" class="btn btn-primary">查看反馈</button>
			</div>
		</div>
		
		<!-- 这里链接到另外一个表，也是点击弹出的方式，这种方式的好处在于后面如果要拓展的话会很简单且界面美观 -->
		<div class="control-group">
			<label class="control-label">缴费记录:</label>
			<div class="controls">
				<button onclick="openNewWindow('${ctx}/record/MyrecordList')" class="btn btn-primary">查看缴费记录</button>
			</div>
		</div>
		
	</form:form>
</body>
</html>